<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<% String path = request.getContextPath(); %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<script type="text/javascript" src="<%=path%>/static/js/jquery-3.5.1.min.js"></script>

<div class="content_l recommend_list">
    <h2>壮壮网根据你的订阅信息为你推荐以下职位： <a class="more" href="/zhuang/user/subscribeList">修改订阅信息&gt;&gt;</a></h2>

    <ul class="hot_pos reset">
        <c:forEach items="${pageInfo.list}" var="job" varStatus="stat">
            <c:if test="${stat.count mod 2 eq 1}">
                <li class="clearfix">
            </c:if>
            <c:if test="${stat.count mod 2 eq 0}">
                <li class="odd clearfix">
            </c:if>
            <div class="hot_pos_l">
                <div class="mb10">
                    <a target="_blank" href="/zhuang/job/jobDetail?jobId=${job.id}">${job.name}</a>
                    &nbsp;
                    <span class="c9">[${job.city.cityName}]</span>
                </div>
                <span><em class="c7">月薪：</em> ${job.money.range}</span>
                <span><em class="c7">经验：</em> ${job.exRequire.require}</span>
                <br>
                <span><em class="c7">最低学历：</em> ${job.degree.title}</span>
                <br>
                <span><em class="c7">福利待遇：</em> ${job.treatment}</span>
                <br>
                <span><fmt:formatDate value="${job.inputTime}"
                                      pattern="yyyy-MM-dd"></fmt:formatDate>发布</span>
            </div>
            <div class="hot_pos_r">
                <div class="mb10 recompany"><a target="_blank"
                                               href="/zhuang/company/myhome?id=${job.company.id}">${job.company.companyName}</a>
                </div>
                <span><em class="c7">领域：</em> ${job.company.industry.industryName}</span>
                <br>
                <span><em class="c7">阶段：</em> ${job.company.stage.stageName}</span>
                <br>
                <span><em class="c7">规模：</em> ${job.company.scale.range}</span>
                <ul class="companyTags reset">
                    <c:forEach items="${job.company.tags}" var="tag">
                        <li>${tag.tagName}</li>
                    </c:forEach>
                </ul>
            </div>
            </li>
        </c:forEach>
    </ul>

    <div class="Pagination myself">
        <a title="1" id="first" data="1">首页</a>
        <span title="上一页" class="disabled" id="last" data="${pageInfo.pageNum>1?pageInfo.pageNum-1:pageInfo.pageNum}">上一页 </span>
        <c:if test="${pageInfo.pageNum gt 3 && pageInfo.pages gt 5}">
            <c:forEach begin="${pageInfo.pageNum-2}" end="${pageInfo.pageNum+2}" var="i" >
                <c:if test="${i le pageInfo.pageNum+2 && pageInfo.pageNum+2 lt pageInfo.pages}">
                    <a data="${i}" title="${i}"<c:if test="${pageInfo.pageNum eq i}">class="current"</c:if>>${i}</a>
                </c:if>
            </c:forEach>
        </c:if>
        <c:if test="${pageInfo.pageNum le 3 || pageInfo.pages le 5}">
            <c:forEach begin="1" end="${pageInfo.pages}" var="i">
                <c:if test="${i le 5}">
                    <a data="${i}" title="${i}"<c:if test="${pageInfo.pageNum eq i}">class="current"</c:if>>${i}</a>
                </c:if>
            </c:forEach>
        </c:if>
        <c:if test="${pageInfo.pageNum ge pageInfo.pages-2}">
            <c:forEach begin="${pageInfo.pages-4}" end="${pageInfo.pages}" var="i">
                <c:if test="${i le pageInfo.pages}">
                    <a data="${i}" title="${i}"<c:if test="${pageInfo.pageNum eq i}">class="current"</c:if>>${i}</a>
                </c:if>
            </c:forEach>
        </c:if>
        <a title="下一页" id="next" data="${pageInfo.pageNum<pageInfo.pages?pageInfo.pageNum+1:pageInfo.pageNum}">下一页 </a>
        <a title="${pageInfo.pages}" id="end" data="${pageInfo.pages}">尾页</a>
        ${pageInfo.total}条
        ${pageInfo.pages}页
    </div>

</div>

